/**
 * 
 */
package com.zouqone.smc.common.web;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zouqone.smc.common.utils.Encodes;
import com.zouqone.smc.common.utils.StringUtils;
import com.zouqone.smc.common.utils.vo.SortVo;

/**
 * @author zouqh
 * @date 2015年8月26日 下午3:37:05
 */
@Controller
@RequestMapping(value = "${adminPath}/tool")
public class ToolController extends BaseController{

	private Logger logger = LoggerFactory.getLogger(getClass());
	
	@RequestMapping(value = "sortPage")
	public String sortPage(SortVo sortVo,HttpServletRequest request,  Model model) {
		String dataStr = sortVo.getDataStr();
		if(!StringUtils.isEmpty(dataStr)){
			String dataStr2 = Encodes.urlDecode(dataStr);
			sortVo.setDataStr(dataStr2);
		}
		
		model.addAttribute("sortVo", sortVo);
		model.addAttribute("dialogId", request.getParameter("dialogId"));
		return "modules/tool/sortTool";
	}
	
}
